package com.stone.serviceimpl;

import java.util.List;

import com.stone.daoimpl.RecommendDao;
import com.stone.model.Recommend;
import com.stone.service.IRecommendService;

public class RecommendService implements IRecommendService {

	private RecommendDao recommendDao ;
	
	//----------set and get
	public RecommendDao getRecommendDao() {
		return recommendDao;
	}

	public void setRecommendDao(RecommendDao recommendDao) {
		this.recommendDao = recommendDao;
	}
	
	//-----------------implements functions
	
	public Recommend addRecommend(Recommend recommend) {
		return recommendDao.save(recommend);
	}

	public void deleteRecommend(Recommend recommend) {
		recommendDao.delete(recommend);
	}

	public List<Recommend> findAllRecommend() {
		return recommendDao.findAll();
	}
}
